<template>
  <div class="app">
    <h2>{{ str }}</h2>
    <button @click="welcome">点我欢迎你</button>
    <button @click="sum+=1">点我sum+1</button>
  </div>
</template>

<script>
  export default {
    name:'App',
    data() {
      return {
        sum:1,
        str:'欢迎你学习Vue'
      }
    },
    methods: {
      welcome(){
        alert('欢迎，欢迎，热烈欢迎！')
      }
    },
  }
</script>

<style>
  .app {
    background-color: #ddd;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 10px;
  }
</style>